<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>欢迎页面-小螺号</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<script type="text/javascript" src="./js/jquery.min.js"></script>
		<!--<link rel="stylesheet" href="css/zTreeStyle.css" />-->
		<!--kindeditor-->
		<link rel="stylesheet" href="kindeditor/themes/default/default.css" />
		<link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" />
		<script charset="utf-8" src="kindeditor/kindeditor-all.js"></script>
		<script charset="utf-8" src="kindeditor/lang/zh-CN.js"></script>
		<script charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script>

		<!-- upload photo -->
		<script type="text/javascript" src="js/common.js"></script>

		<!--<script type="text/javascript" src="js/jquery.ztree.all-3.5.min.js" ></script>-->
		<!--<script type="text/javascript" src="js/category_selecter.js"></script>-->
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	</head>

	<body>
		<div class="x-body">

			<form class="layui-form" action="">
				<div class="layui-tab">

					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<div class="layui-form-item" style=" display: none;">
								<label class="layui-form-label">ID</label>
								<div class="layui-input-inline">
									<input type="text" name="goodSid" class="layui-input" value="1">
								</div>
							</div>
							<!--<div class="layui-form-item" style=" display: none;">
								<label class="layui-form-label">商品编号</label>
								<div class="layui-input-inline">
									<input type="text" name="goodsCode" class="layui-input" value="EF00001">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">商品货号</label>
								<div class="layui-input-inline">
									<input type="text" name="goodsNumber" class="layui-input" value="白001">
								</div>
							</div>-->
							<div class="layui-form-item">
								<label class="layui-form-label">代金券名称：</label>
								<div class="layui-input-inline">
									<input type="text" name="couponTitle" id="couponTitle" lay-verify="couponTitle" autocomplete="off"  class="layui-input" value="代金券名称">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label">面值金额：</label>
								<div class="layui-input-inline">
									<input type="text" name="couponPrice" id="couponPrice" required=""  lay-verify="couponPrice" autocomplete="off"  class="layui-input" value="30元" >
								</div>

							</div>
							<div class="layui-form-item">

								<div class="layui-inline">
									<label class="layui-form-label">开始时间：</label>
									<div class="layui-input-inline">
										<input type="text" name="date1" id="date1" required="" lay-verify="date1" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-inline">
									<label class="layui-form-label">结束时间：</label>
									<div class="layui-input-inline">
										<input type="text" name="date2" id="date2" required="" lay-verify="date2" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
									</div>
								</div>
							</div>
							<div class="layui-form-item">
								
									<label class="layui-form-label">使用条件：</label>
									<label class="layui-form-label" style=" width:70px;padding:9px 3px 9px 0px; text-align:left; color: red;">全场订单满</label>
									<div class="layui-input-inline">
										<input type="text" name="use-tj" id="use-tj" required="" lay-verify="use-tj" class="layui-input" value="200" style="">
									</div>
									<label class="layui-form-label" style=" width:70px;padding:9px 3px 9px 0px; text-align:left; color: red;">可使用</label>
								
							</div>

						</div>

					</div>
				</div>

				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
		<script>
			layui.use(['form', 'layer', 'element'], function() {
				$ = layui.jquery;
				var form = layui.form,
					var element = layui.element,
						layer = layui.layer;
						
				//监听提交
				form.on('submit(add)', function(data) {
					console.log(data);
					//发异步，把数据提交给php
					layer.alert("增加成功", {
						icon: 6
					}, function() {
						// 获得frame索引
						var index = parent.layer.getFrameIndex(window.name);
						//关闭当前frame
						parent.layer.close(index);
					});
					return false;
				});

			});
		</script>

		<script>
			layui.use('laydate', function() {
				var laydate = layui.laydate;
				//日期
				laydate.render({
					elem: '#date1'
				});
				laydate.render({
					elem: '#date2'
				});
			});
		</script>

	</body>

</html>